
const request = require('../../../utils/request');

Component({

    behaviors: [],

    properties: {
        shopId: Number
    },
    data: {
        comments: []
    }, // 私有数据，可用于模版渲染

    // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
    attached: function () { },
    moved: function () { },
    detached: function () { },
    ready: function() {
        var that = this;
        setTimeout(function(){
            request.HttpRequst(true,'shop/comments',2,'',{"shop_id": that.data.shopId },"POST",false,res => {
                console.log(res.data.data)
                that.setData({
                    comments: res.data.data
                })
                that.triggerEvent('commitNum', res.data.data)
            })
        },1000)
        
    },

    methods: {

    }

})